-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up NPM packaging as a private package #31
Conversation
…workflow for publishing Addresses ENG-1642. Includes updates to package.json (prepublishOnly script, GPLv3 license, "p0" entrypoint, packaged files) needed in order to serve package on NPM. Note that currently it is published as @komaldhull/p0cli, a private package under my NPM user. This is just for testing purposes. When we are ready to make it public, I have created an organization called "p0security", and we can publish it under @p0security/p0cli. The ticket ENG-1531 captures this TODO. Also adds a Github workflow to publish the package to NPM when a github release is published. Tested via installing the CLI using npm install -g (if you send me your NPM username, I can add you to the private package so you can test as well), and tested the workflow by triggering it manually and verifying that publish succeeds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
"build": "tsc && cp -r public dist/", | ||
"clean": "rm -rf dist/", | ||
"p0": "node --no-deprecation ./p0", | ||
"prepublishOnly": "npm run clean && npm run build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the npm part is extraneous, as is the run:
"prepublishOnly": "npm run clean && npm run build" | |
"prepublishOnly": "clean && build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried removing and it seems to be needed 🤷
package.json
Outdated
"clean": "rm -rf build/", | ||
"p0": "node --no-deprecation ./p0" | ||
"build": "tsc && cp -r public dist/", | ||
"clean": "rm -rf dist/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably also wipe the .tsbuildinfo
in case ts is broken
Addresses ENG-1642. Includes updates to package.json (prepublishOnly script, GPLv3 license, "p0" entrypoint, packaged files) needed in order to serve package on NPM. Note that currently it is published as @komaldhull/p0cli, a private package under my NPM user. This is just for testing purposes. When we are ready to make it public, I have created an organization called "p0security", and we can publish it under @p0security/p0cli. The ticket ENG-1531 captures this TODO. Also adds a Github workflow to publish the package to NPM when a github release is published.
Tested via installing the CLI using npm install -g (if you send me your NPM username, I can add you to the private package so you can test as well), and tested the workflow by triggering it manually and verifying that publish succeeds.